package Day09;

import java.util.ArrayList;

public class TeacherTest {
    public static void main(String[] args) {
        ArrayList<Teacher> list=new ArrayList<>();
        Teacher s1=new  Teacher("赵老师","javase");
        Teacher s2=new  Teacher("钱老师","javaee");
        Teacher s3=new  Teacher("孙老师","php");
        Teacher s4=new  Teacher("李老师","python");
        list.add(s1);
        list.add(s2);
        list.add(s3);
        list.add(s4);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).getName()+" "+list.get(i).getMajor());
        }

    }
}
